<!-- content of popup function list dialog -->
${entityList.size()} / ${entityCount} 功能

#{if role!=null}<input type="hidden" id="roleId" name="roleId" value="${role.id}"/>#{/if}

<table id="func_list">
    <thead>
    <tr>
        <th class="main">功能名</th>
        <th class="main">键值</th>
        <th class="main">备注</th>
        <th class="main">父功能</th>
    </tr>
    </thead>
#{if entityList.size()>0}
    #{list items:entityList, as:'func'}
        <tr #{if role!=null && role.ownsFunction(func)}style="background-color: #8fbc8f;" #{/if}>
            <td class="main">
                <input type="checkbox"
                       #{if role!=null && role.ownsFunction(func)}checked="checked" #{/if}
                       name="functionId" id="functionId_${func.id}"
                       value="${func.id}"/>
                <label for="functionId_${func.id}">${func.name}</label>
            </td>
            <td class="main"><a href="#">${func.key}</a></td>
            <td class="main">${func.remark}</td>
            <td class="main">${func.parent==null?"----":func.parent.name}</td>
        </tr>
    #{/list}
#{/if}
</table>